Get Process And Fee
The GetProcessAndFee API retrieves the transaction fee details based on the ledger-configured fee for the transaction type.
Method: POST
{{URL}}/jsonrpc
Headers
Name | Value |
---|---|
Content-Type | application/json |
Credential | Basic c3VwcG9ydCsxQG5ldHN5cy1pbmMuY29tOjM5ZDYxOGJkNTVmN5NWQxY2RlNDE5 |
Signature | {{signature}} |
Example
Request Parameters
Parameter | Description |
---|---|
transactionAmount Mandatory | Object |
amount Mandatory | String Value of the transaction Example: "1002" |
currency Mandatory | String Currency type used for the transaction Example: "USD" |
creditorAccount Mandatory | Object |
identification Mandatory | String Account number of the creditor's account Example: "200522479517839" |
identificationType Mandatory | String Type of account identification Example: "ACCOUNT_NUMBER" |
identificationType2 Mandatory | String Type of account Example: "CHECKING" |
institution Mandatory | Object |
name Mandatory | String Name of the creditor bank Example: "CBW Bank" |
identification Mandatory | String Bank's identification number Example: "101201164" |
identificationType Mandatory | String Identification type of bank Example: "ABA" |
debtorAccount Mandatory | Object |
identification Mandatory | String Account number for the debtor's account Example: "200401278247450" |
identificationType Mandatory | String Type of account identification Example: "ACCOUNT_NUMBER" |
institution Mandatory | Object |
name Mandatory | String Name of debtor bank Example: "ABC BANK" |
identification Mandatory | String Bank's identification number Example: "124303298" |
identificationType Mandatory | String Type of bank identification Example: "ABA" |
- cURL
- C#
- Go
- NodeJs
curl --location --globoff --request GET '{{URL}}/jsonrpc' \
--header 'Content-Type: application/json' \
--data '{"method":"TransactionService.GetProcessAndFee","id":"1","params":{"payload":{"transactionAmount":{"amount":"1002","currency":"USD"},"creditorAccount":{"identification":"200522479517839","identificationType":"ACCOUNT_NUMBER","identificationType2":"CHECKING","institution":{"name":"CBW Bank","identification":"101201164","identificationType":"ABA"}},"debtorAccount":{"identification":"200401278247450","identificationType":"ACCOUNT_NUMBER","institution":{"name":"ABC BANK","identification":"124303298","identificationType":"ABA"}}},"api":{"credential":"Basic amVnYW4uckBuZXR4ZC5jb206ZmE3NTg4NzYyMDUxNDRhM2FmZTRlMDJiNzIzOTM2M2E=","signature":"{{signature}}","apiKey":"fa758876205144a3afe4e02b7239363a","keyId":"41199"}}}'
var options = new RestClientOptions("{{URL}}/jsonrpc")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("", Method.Get);
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@" ""method"": ""TransactionService.GetProcessAndFee"",
" + "\n" +
@" ""id"": ""1"",
" + "\n" +
@" ""params"": {
" + "\n" +
@" ""payload"": {
" + "\n" +
@" ""transactionAmount"": {
" + "\n" +
@" ""amount"": ""1002"",
" + "\n" +
@" ""currency"": ""USD""
" + "\n" +
@" },
" + "\n" +
@" ""creditorAccount"": {
" + "\n" +
@" ""identification"": ""200522479517839"",
" + "\n" +
@" ""identificationType"": ""ACCOUNT_NUMBER"",
" + "\n" +
@" ""identificationType2"": ""CHECKING"",
" + "\n" +
@" ""institution"": {
" + "\n" +
@" ""name"": ""CBW Bank"",
" + "\n" +
@" ""identification"": ""101201164"",
" + "\n" +
@" ""identificationType"": ""ABA""
" + "\n" +
@" }
" + "\n" +
@" },
" + "\n" +
@" ""debtorAccount"": {
" + "\n" +
@" ""identification"": ""200401278247450"",
" + "\n" +
@" ""identificationType"": ""ACCOUNT_NUMBER"",
" + "\n" +
@" ""institution"": {
" + "\n" +
@" ""name"": ""ABC BANK"",
" + "\n" +
@" ""identification"": ""124303298"",
" + "\n" +
@" ""identificationType"": ""ABA""
" + "\n" +
@" }
" + "\n" +
@" }
" + "\n" +
@" },
" + "\n" +
@" ""api"": {
" + "\n" +
@" ""credential"": ""Basic amVnYW4uckBuZXR4ZC5jb206ZmE3NTg4NzYyMDUxNDRhM2FmZTRlMDJiNzIzOTM2M2E="",
" + "\n" +
@" ""signature"": ""{{signature}}"",
" + "\n" +
@" ""apiKey"": ""fa758876205144a3afe4e02b7239363a"",
" + "\n" +
@" ""keyId"": ""41199""
" + "\n" +
@" }
" + "\n" +
@" }
" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{URL}}/jsonrpc"
method := "GET"
payload := strings.NewReader(`{`+"
"+`
"method": "TransactionService.GetProcessAndFee",`+"
"+`
"id": "1",`+"
"+`
"params": {`+"
"+`
"payload": {`+"
"+`
"transactionAmount": {`+"
"+`
"amount": "1002",`+"
"+`
"currency": "USD"`+"
"+`
},`+"
"+`
"creditorAccount": {`+"
"+`
"identification": "200522479517839",`+"
"+`
"identificationType": "ACCOUNT_NUMBER",`+"
"+`
"identificationType2": "CHECKING",`+"
"+`
"institution": {`+"
"+`
"name": "CBW Bank",`+"
"+`
"identification": "101201164",`+"
"+`
"identificationType": "ABA"`+"
"+`
}`+"
"+`
},`+"
"+`
"debtorAccount": {`+"
"+`
"identification": "200401278247450",`+"
"+`
"identificationType": "ACCOUNT_NUMBER",`+"
"+`
"institution": {`+"
"+`
"name": "ABC BANK",`+"
"+`
"identification": "124303298",`+"
"+`
"identificationType": "ABA"`+"
"+`
}`+"
"+`
}`+"
"+`
},`+"
"+`
"api": {`+"
"+`
"credential": "Basic amVnYW4uckBuZXR4ZC5jb206ZmE3NTg4NzYyMDUxNDRhM2FmZTRlMDJiNzIzOTM2M2E=",`+"
"+`
"signature": "{{signature}}",`+"
"+`
"apiKey": "fa758876205144a3afe4e02b7239363a",`+"
"+`
"keyId": "41199"`+"
"+`
}`+"
"+`
}`+"
"+`
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'GET',
'hostname': '{{URL}}',
'path': '/jsonrpc',
'headers': {
'Content-Type': 'application/json'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
var postData = JSON.stringify({
"method": "TransactionService.GetProcessAndFee",
"id": "1",
"params": {
"payload": {
"transactionAmount": {
"amount": "1002",
"currency": "USD"
},
"creditorAccount": {
"identification": "200522479517839",
"identificationType": "ACCOUNT_NUMBER",
"identificationType2": "CHECKING",
"institution": {
"name": "CBW Bank",
"identification": "101201164",
"identificationType": "ABA"
}
},
"debtorAccount": {
"identification": "200401278247450",
"identificationType": "ACCOUNT_NUMBER",
"institution": {
"name": "ABC BANK",
"identification": "124303298",
"identificationType": "ABA"
}
}
},
"api": {
"credential": "Basic amVnYW4uckBuZXR4ZC5jb206ZmE3NTg4NzYyMDUxNDRhM2FmZTRlMDJiNzIzOTM2M2E=",
"signature": "{{signature}}",
"apiKey": "fa758876205144a3afe4e02b7239363a",
"keyId": "41199"
}
}
});
req.write(postData);
req.end();
Request Body
{
"method": "TransactionService.GetProcessAndFee",
"id": "1",
"params": {
"payload": {
"transactionAmount": {
"amount": "1002",
"currency": "USD"
},
"creditorAccount": {
"identification": "200522479517839",
"identificationType": "ACCOUNT_NUMBER",
"identificationType2": "CHECKING",
"institution": {
"name": "CBW Bank",
"identification": "101201164",
"identificationType": "ABA"
}
},
"debtorAccount": {
"identification": "200401278247450",
"identificationType": "ACCOUNT_NUMBER",
"institution": {
"name": "ABC BANK",
"identification": "124303298",
"identificationType": "ABA"
}
}
},
"api": {
"credential": "Basic amVnYW4uckBuZXR4ZC5jb206ZmE3NTg4NzYyMDUxNDRhM2FmZTRlMDJiNzIzOTM2M2E=",
"signature": "{{signature}}",
"apiKey": "fa758876205144a3afe4e02b7239363a",
"keyId": "41199"
}
}
}
Response: 200
Response Parameters
Parameter | Description |
---|---|
id | String Unique response id Example: " 1" |
result | Object |
fee | Object |
amount | Number Fee amount, in cents Example: 100 |
currency | String Currency type of fee Example: " USD" |
tax | Number Tax amount applicable for the fee, in cents Example: 0 |
supportedChannel | String Channel through which transaction is processed Example: " TCH" Possible values: "TCH", "FEDNOW", "ACH", "WIRE" |
jsonrpc | String RPC Version Example: " 2.0" |
Response Body
{
"id": "1",
"result": {
"fee": {
"amount": 100,
"currency": "USD",
"tax": 0
},
"supportedChannel": "TCH"
},
"jsonrpc": "2.0"
}